using System;
using System.Collections.Generic;
using Nairo.Parser;

namespace Nairo.Parser.Dom
{
///	 <summary>
///	 The base for all entities in an ASP .NET Document.
///	 <summary>
	public interface INode
	{
		INode Parent {
			get;
			set;
		}
		
		bool HasChildNodes {
			get;
		}
		
		FileUnit File {
			get;
		}
		
		List<INode> Children {
			get;
			set;
		}
		
		INode GetTag(string name);
		INode[] GetTags(string name);
		
///		 <summary>
///		 Visits all children
///		 <summary>
///		 <param name="visitor">The visitor to accept<param>
///		 <param name="data">Additional data for the visitor<param>
///		 <returns>The paremeter <paramref name="data"><returns>
		object AcceptChildren(IDomVisitor visitor, object data);
		
///		 <summary>
///		 Accept the visitor
///		 <summary>
///		 <param name="visitor">The visitor to accept<param>
///		 <param name="data">Additional data for the visitor<param>
///		 <returns>The value the visitor returns after the visit<returns>
		object AcceptVisitor(IDomVisitor visitor, object data);
	}
}
